package org.wkg.lesson09;

public class Demo_907 {
    public static void main(String[] args) {
        //Student student = new Student(16,"张三");
        Student student1 = Student.StudentIdSno(1, "haha");
        Student student2 = Student.StudentAgeName(16, "小明");
        System.out.println(student1.getId() + "   " + student1.getSno());
        System.out.println(student2.getAge() + "   " + student2.getName());


    }

}


class Student {
    private int id;
    private int age;
    private int classId;
    private String name;
    private String sno;

/*    public Student(int id, String sno) {
        this.id = id;
        this.sno = sno;
    }

    public Student(int age, String name) {
        this.age = age;
        this.name = name;
    }*/

    public static Student StudentIdSno(int id, String sno) {
        Student student = new Student();
        student.setId(id);
        student.setSno(sno);
        return student;
    }

    public static Student StudentAgeName(int age, String name) {
        Student student = new Student();
        student.setAge(16);
        student.setName(name);
        return student;
    }

    public void setId(int id) {
        this.id = id;
    }

    public void setAge(int age) {
        this.age = age;
    }

    public void setClassId(int classId) {
        this.classId = classId;
    }

    public void setName(String name) {
        this.name = name;
    }

    public void setSno(String sno) {
        this.sno = sno;
    }

    public int getId() {
        return id;
    }

    public int getAge() {
        return age;
    }

    public int getClassId() {
        return classId;
    }

    public String getName() {
        return name;
    }

    public String getSno() {
        return sno;
    }


}